<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
    工程名：MealOrder
    时间： 17-2-21
    作者：白雨濃 evil
    邮箱：evilbai@foxmail.com
    内容：
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%--去除多余空格--%>
<%@ page trimDirectiveWhitespaces="true" %>
<%--h5声明--%>
<div class="container">
    <div class="navigation">
        <ol class="breadcrumb">
            <li><a href="#">基本信息</a></li>
            <li class="active">饭店基本信息</li>
        </ol>
    </div>

    <form class="input form-horizontal" role="form" enctype="multipart/form-data">
        <div class="form-group">
            <label for="name" class="col-sm-2 control-label">饭店名称</label>
            <div class="col-sm-5">
                <input id="name" name="name" type="text" class="form-control"
                       value="${essential.name}" placeholder="请输入饭店名称">
                <span class="help-block"></span>
            </div>
        </div>

        <div class="form-group">
            <label for="address" class="col-sm-2 control-label">地理位置</label>
            <div class="col-sm-5">
                <input id="address" name="address" type="text" class="form-control"
                       value="${essential.address}" placeholder="请输入饭店地理位置">
                <span class="help-block"></span>
            </div>
        </div>

        <div class="form-group">
            <label for="introduction" class="col-sm-2 control-label">简介</label>
            <div class="col-sm-5">
                <textarea id="introduction" name="introduction" class="form-control"
                          rows="3" title="简介">${essential.introduction}</textarea>
                <span class="help-block"></span>
            </div>
        </div>

        <div class="form-group">
            <label for="type" class="col-sm-2 control-label">饭店类型</label>
            <div class="col-sm-5">
                <select id="type" name="type" class="form-control">
                    <option></option>
                    <c:forEach items="${typeList}" var="type">
                        <c:choose>
                            <c:when test="${type.equals(essential.type)}">
                                <option selected>${type}</option>
                            </c:when>
                            <c:otherwise>
                                <option>${type}</option>
                            </c:otherwise>
                        </c:choose>
                    </c:forEach>
                </select>
                <span class="help-block"></span>
            </div>
        </div>

        <div class="form-group">
            <label for="img" class="col-sm-2 control-label">简介图片</label>
            <div class="col-sm-5">
                <input id="img" name="img" type="file" value="null">
                <span class="help-block"></span>
                <c:if test="${essential.img!=null&&!essential.img.equals('')}">
                    <img src="/static/upload/img/essential/${essential.img}" width="200px"/>
                </c:if>
            </div>
        </div>
    </form>

    <div class="submit-layout">
        <button id="submit" class="btn btn-info">
            <span class="glyphicon glyphicon-ok-sign"> 提交</span>
        </button>
    </div>
    <hr>

    <div class="seat-layout">
        <table class="table table-hover">
            <caption>
                <span>基本座位信息</span>
                <span style="color: #E00903">添加后禁止删除，请谨慎操作！</span>
                <button id="add-seat" class="btn btn-xs btn-default pull-right">
                    <span class="glyphicon glyphicon-plus-sign"></span> 添加
                </button>
            </caption>
            <thead>
            <tr>
                <th>ID</th>
                <th>座位号</th>
                <th>状态</th>
            </tr>
            </thead>
            <tbody>
            </tbody>
        </table>
    </div>
</div>


<div id="seat-dialog" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title"></h4>
            </div>

            <div class="modal-body">


            </div>

            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button id="dialog-submit" type="button" class="btn btn-primary">提交更改</button>
            </div>
        </div>
    </div>
</div>

<script src="<c:url value="/static/js/jquery.form.min.js"/>"></script>
<script src="<c:url value="/static/js/setting_base.js"/>"></script>